<template>
  <div class="zongg">
    <div class="top">
      <div class="tou">
        <img :src="id.doctorimage" alt="">
      <van-tag plain type="primary">知名专家</van-tag>
      </div>
      <div class="zho">
        <h3>{{ id.doctorname }}</h3>
      <p>{{ id.doctorstate }}</p>
      <p>{{ id.doctoradministre }}</p>
      </div>
        <div class="zhuanysc">
        <p>专业擅长</p>
        <van-text-ellipsis rows="1.5" :content="id.doctordescword" />
        <button class="chak" @click="showPopup">查看简介〉</button>
        <!-- 底部弹出 -->
        <van-popup
          v-model:show="show"
          position="bottom"
          :style="{ padding: '.2rem' }"
        >
          <h2
            style="
              text-align: center;
              background: linear-gradient(
                rgb(202, 248, 202),
                rgb(234, 238, 231)
              );
            "
          >
            职业简介
          </h2>
          <h3 style="border-left: 3px solid #0ceba4">个人简介</h3>
          {{ id.doctordescword }}
        </van-popup>
      </div>
    </div>
    <div class="guanf">
      <p>
        <img src="../../images/26b9b5774ad5c59eb18be09df24f60e5.png" alt="">
        官方号源
      </p>
      <p>
        <img src="../../images/26b9b5774ad5c59eb18be09df24f60e5.png" alt="">
        医生本人
      </p>
      <p>
        <img src="../../images/26b9b5774ad5c59eb18be09df24f60e5.png" alt="">
        平台认证
      </p>
      <p>
        <img src="../../images/26b9b5774ad5c59eb18be09df24f60e5.png" alt="">
        诊前退款
      </p>
    </div>
  
    <div class="chu">
      <p class="chuz">出诊地—</p>
      <h2>{{ id.doctorcity }}</h2>
      <p class="biaoq">
        <van-tag plain type="primary">知名专家</van-tag>
      <van-tag plain type="primary">知名专家</van-tag>
      </p>
    </div>
      <p style="border-bottom: 2px solid green;height:.8rem;padding-left:.2rem">{{ id.doctoradministre }}</p>
    <div class="footb">
      <h5>2024-11-19 周二 上午</h5>
      <p>普通：<b>0元</b></p>
      <button @click="qgh">剩余4</button>
    </div>
    <div class="footb">
      <h5>2024-11-19 周二 上午</h5>
      <p>普通：<b>0元</b></p>
      <button @click="qgh">剩余4</button>
    </div>
    <div class="footb">
      <h5>2024-11-19 周二 上午</h5>
      <p>普通：<b>0元</b></p>
      <button @click="qgh">剩余4</button>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { useRoute, useRouter } from "vue-router"
import { useCounterStore } from "./stores/counter";
const store = useCounterStore()
const route = useRoute()
const id = route.query
const xysdata = id
store.setxysinfo(xysdata)
const show = ref(false)
const showPopup = () => {
  show.value = true
}
console.log(id) // Output: { id: '123' }
const router = useRouter()
const qgh = ()=>{
  router.push({path:"/xiao/quguahao",query:xysdata})
}
</script>

<style lang="scss">
.zongg {
  width: 100vw;
  height: 100vh;
  padding-top: 1.3rem;
  background: linear-gradient(
    rgb(215, 238, 215),
    rgb(234, 238, 231),
    rgb(234, 238, 231),
    rgb(234, 238, 231)
  );
  font-size: 0.5rem;
}
.top {
  width: 92%;
  height: 3rem;
  background-color: #fff;
  margin-left: 2.5%;
  border-radius: 0.1rem;
  padding-left: 0.2rem;
  .tou{
    width: 100%;
    height: .8rem;
  }
  img {
    width: 1.4rem;
    height: 1.4rem;
    background-color: #cdced1;
    margin-right: 0.5rem;
    margin-top: -.7rem;
    border-radius: 5rem;
    float: left;
  }
  .van-tag{
    height: 0.5rem;
    float: left;
    margin-top: 0.2rem;
  }
 .zho{
  height: 1rem;
  display: flex;
  justify-content:space-around;
  align-items:center;
  font-size: 0.4rem;
  margin-top: -0.1rem;
  p{
    font-size: 0.32rem;
    color: #595a5b;
  }
 }
}
.zhuanysc {
  width: 100%;
  height: 1rem;
  margin-top: .3rem;
    font-size: 0.3rem;
    color: rgb(88, 86, 86);
     p{
    color: green;
    font-weight: 900;
    float: left;
    margin-top: -0.2rem;
  }
  .van-text-ellipsis {
    width: 5.6rem;
    float: left;
    margin-top: -.3rem;
  }
  .chak {
    float: right;
    margin-top: -0.5rem;
    border: none;
    color: hsl(93, 68%, 28%);
    background-color: #fff;
  }
  }
 .guanf{
  width: 94%;
  height: 0.7rem;
  margin-left: 3%;
  background-color: #fff;
  font-size: 0.26rem;
  display: flex;
  justify-content: space-around;
  background-color: #e6f7f0;
  img{
    width: 0.4rem;
    height: 0.4rem;
    float: left;
    margin-top: 0.15rem;
  }
  p{
    margin: 0;
    line-height: 0.7rem;
    color: #898888;
  }
 }
 .chu{
  width: 94%;
  margin-left: 3%;
  height: 2rem;
  background-color: #f5f7f8;
  margin-top: 0.3rem;
  font-size: 0.5rem;
  .chuz{
    width: 0.5rem;
    height: 1.4rem;
    background-color: green;
    // line-height: .3rem;
    color: #fff;
    font-size: 0.3rem;
    border-top-right-radius: .2rem;
    border-bottom-right-radius: .2rem;
    float: left;
  }
  h2{
    height: .8rem;
    font-size: 0.5rem;
    margin-left: 1rem;
    padding-top: 0.2rem;
    margin: 0;
    margin-left: 1rem;
  }
  .biaoq{
    float: left;
    margin: 0;
    margin-left: 1rem;
  }
 }
 .footb{
  width: 85%;
  height: 1.4rem;
  background-color: #fff;
  margin-left: 6%;
  margin-top: 0.1rem;
  padding: .1rem;
  border-radius: .1rem;
  h5{
    height: 0.7rem;
    margin: 0;
    width: 70%;
    float: left;
  }
  p{
    font-size: 0.3rem;
    width: 70%;
    margin: 0;
    height: .6rem;
    color: #595a5b;
    float: left;
    b{
      color: red;
    }
  }
  button{
    margin-top: 0.3rem;
    border-radius: .5rem;
    font-size: 0.4rem;
    background-color: #90c072;
    color: #fff;
    border: none;
    float: left;
    margin: 0;
  }
 }
</style>